package com.zero2oneit.mall.member.api;

import com.zero2oneit.mall.common.annotion.RepeatSubmit;
import com.zero2oneit.mall.common.bean.auth.AppWxLoginObject;
import com.zero2oneit.mall.common.bean.auth.RegisterInfo;
import com.zero2oneit.mall.common.utils.R;
import com.zero2oneit.mall.member.service.MemberInfoService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Description: 用户登录、注册、忘记密码
 *
 * @author Tg
 * @email zero2oneit@163.com
 * @date 2021/4/18
 */
@RestController
@RequestMapping("/api/member/auth")
public class AuthApi {

    @Autowired
    MemberInfoService memberInfoService;

    /**
     * 账号、密码注册
     * @param
     * @return
     */
    @PostMapping("/register")
    public R register(@RequestBody Map<String, String> params){

        return R.ok("注册成功");
    }

    /**
     * 账号、密码登录
     * @param
     * @return
     */
    @PostMapping("/login")
    public R login(@RequestBody Map<String, String> params){

        return R.ok("登录成功");
    }

    /**
     * 小程序一键登录
     * @param
     * @return
     */
    @PostMapping("/appletLogin")
    public R appletLogin(@RequestBody Map<String, String> params){

        return R.ok("登录成功");
    }

    /**
     * 忘记/修改登录密码
     * @param
     * @return
     */
    @PostMapping("/forget")
    public R forget(@RequestBody Map<String, String> params){

        return R.ok("操作成功");
    }

}
